const baseSize = 75; //设计稿宽度%10

// 设置rem 函数
function setRem() {
//计算当前分辨率的宽%设计稿宽度
  const scale = window.innerWidth / (baseSize * 10);
  // 给根元素设置font-size
  document.documentElement.style.fontSize =
    baseSize * scale + "px";
}
setRem();
window.onresize = function () {
  setRem();
};
